package com.tcp2.frame.plat;

import javax.swing.*;
import javax.swing.border.TitledBorder;

/**
 * Author: <张锦煌>
 * Time: 2015-12-25 16:02
 * Copyright (C) 2015 Xiamen Yaxon Networks CO.,LTD.
 */
public class Frame2044 {

    public JTextField versionField = new JTextField("0",20);   //电子服务证版本
    public JTextField noField = new JTextField("555557",20);   //司机工号

    //主容器
    JPanel jp;

    public Frame2044(JPanel parent) {
        this.jp = parent;
    }

    /**
     * 初始化界面
     */
    public void init(){
        Box box1 = Box.createHorizontalBox();
        JLabel jlDesc = new JLabel("功能描述：透传请求下载电子服务证; 消息ID=0x0900, 命令字:0x2044");
        box1.add(jlDesc);

        JPanel jp1 = new JPanel();
        TitledBorder t2 = new TitledBorder("电子服务证信息");
        jp1.setBorder(t2);

        JLabel l1 = new JLabel("司机工号:       ");
        Box box2 = Box.createHorizontalBox();
        box2.add(l1);box2.add(noField);

        JLabel l2 = new JLabel("电子服务证版本: ");
        Box box3 = Box.createHorizontalBox();
        box3.add(l2);box3.add(versionField);

        Box v1=Box.createVerticalBox();
        v1.add(box2);
        v1.add(Box.createVerticalStrut(30));
        v1.add(box3);
        jp1.add(v1);

        Box box = Box.createVerticalBox();
        box.add(Box.createVerticalStrut(20));
        box.add(box1);
        box.add(Box.createVerticalStrut(10));
        box.add(jp1);
        jp.add(box,"p9");
    }
}
